package com.common.security.exceptions;

import com.common.security.abstracts.AbstractException;

/**
 * Error code range: 1121 - 1140
 * 
 * @author Ady
 *
 */
public class HTTPException extends AbstractException {
	private static final long serialVersionUID = 1L;

	public static final int ACTION_NOT_AVAILABLE = 1121;
	private static final String MESSAGE_ACTION_NOT_AVAILABLE = "The provided action is unavailable";
	
	public HTTPException(int code) {
		super(code, getMessage(code));
	}
	
	private static String getMessage(int code) {
		switch (code) {
			case ACTION_NOT_AVAILABLE: {
				return MESSAGE_ACTION_NOT_AVAILABLE;
			}
			default: {
				return MESSAGE_ERROR_NOT_FOUND;
			}
		}
	}
}
